<template>
  <div class="crossborder">
      <Swiper :banners="banners"></Swiper>
      <div
        class="pros"
        >
        <Pros :pro="pros"></Pros>
      </div>
  </div>
</template>

<script>
import { instance } from '@/utils/http'
import Swiper from '@/components/Swiper'
import Pros from '@/components/Pros'
export default {
  components: {
    Swiper,
    Pros
  },
  data () {
    return {
      banners: [],
      newGoods: [],
      pros: []
    }
  },
  created () {
    if (!this.banners.length) {
      instance.get('/appapi/home/mktBannerApp/v3?silo_id=2013000100000000003&platform_code=PLATEFORM_H5')
        .then(res => {
          console.log(res.data)
          this.banners = res.data.banners
        })
    }
    if (!this.pros.length) {
      instance.get('/appapi/silo/eventForH5?categoryId=women&pageIndex=1&timestamp=1586527255454&summary=21b8ab79b83178552158ca6d5b42e00f&platform_code=H5')
        .then(res => {
          this.pros = res.data.eventList
        })
    }
  }
}
</script>

<style lang="scss" scoped>
.crossborder {
  .pros {
    padding: .2rem .16rem;
    h4 {
      margin-bottom: .2rem;
      font-size: .2rem;
      color: black;
    }
  }
}
</style>
